package com.zy.web.demo.shejimoshi.danli;

/**
 * @author <a href="mailto:zhouyong@cqyyt.com">zy</a>
 * @version 1.0
 * @date 2020/8/19 9:35
 * 饿汉式
 * 没加锁效率高，线程是安全的，但是类加载的时候就是初始化，造成内存浪费
 */
public class DanLi3 {

    private static DanLi3 danli3 = new DanLi3();

    public DanLi3(){};

    public static DanLi3 getInstance(){
        return  danli3;
    }

}
